home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / hypercar / xcmd / locale.sit / Locale Package / cards.xml < prev    next >
Text File  |  1991-02-01  |  53KB  |  1,151 lines

  1. card_5034.xml
  2. <?xml version="1.0" encoding="utf-8" ?>
  3. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  4. <card>
  5.     <id>5034</id>
  6.     <filler1>0</filler1>
  7.     <bitmap>BMAP_5240.pbm</bitmap>
  8.     <cantDelete> <false /> </cantDelete>
  9.     <showPict> <true /> </showPict>
  10.     <dontSearch> <false /> </dontSearch>
  11.     <owner>2566</owner>
  12.     <link rel="stylesheet" type="text/css" href="stylesheet_3211.css" />
  13.     <part>
  14.         <id>2</id>
  15.         <type>field</type>
  16.         <visible> <true /> </visible>
  17.         <dontWrap> <false /> </dontWrap>
  18.         <dontSearch> <false /> </dontSearch>
  19.         <sharedText> <false /> </sharedText>
  20.         <fixedLineHeight> <false /> </fixedLineHeight>
  21.         <autoTab> <false /> </autoTab>
  22.         <lockText> <true /> </lockText>
  23.         <rect>
  24.             <left>5</left>
  25.             <top>24</top>
  26.             <right>508</right>
  27.             <bottom>304</bottom>
  28.         </rect>
  29.         <style>transparent</style>
  30.         <autoSelect> <false /> </autoSelect>
  31.         <showLines> <false /> </showLines>
  32.         <wideMargins> <false /> </wideMargins>
  33.         <multipleLines> <false /> </multipleLines>
  34.         <reservedFamily> 0 </reservedFamily>
  35.         <titleWidth>0</titleWidth>
  36.         <icon>0</icon>
  37.         <textAlign>left</textAlign>
  38.         <font>Palatino</font>
  39.         <textSize>12</textSize>
  40.         <textStyle>plain</textStyle>
  41.         <textHeight>16</textHeight>
  42.         <name></name>
  43.         <script></script>
  44.     </part>
  45.     <part>
  46.         <id>3</id>
  47.         <type>field</type>
  48.         <visible> <true /> </visible>
  49.         <dontWrap> <false /> </dontWrap>
  50.         <dontSearch> <false /> </dontSearch>
  51.         <sharedText> <false /> </sharedText>
  52.         <fixedLineHeight> <false /> </fixedLineHeight>
  53.         <autoTab> <false /> </autoTab>
  54.         <lockText> <true /> </lockText>
  55.         <rect>
  56.             <left>261</left>
  57.             <top>217</top>
  58.             <right>497</right>
  59.             <bottom>281</bottom>
  60.         </rect>
  61.         <style>shadow</style>
  62.         <autoSelect> <false /> </autoSelect>
  63.         <showLines> <false /> </showLines>
  64.         <wideMargins> <false /> </wideMargins>
  65.         <multipleLines> <false /> </multipleLines>
  66.         <reservedFamily> 0 </reservedFamily>
  67.         <titleWidth>0</titleWidth>
  68.         <icon>0</icon>
  69.         <textAlign>left</textAlign>
  70.         <font>Geneva</font>
  71.         <textSize>12</textSize>
  72.         <textStyle>plain</textStyle>
  73.         <textHeight>16</textHeight>
  74.         <name></name>
  75.         <script></script>
  76.     </part>
  77.     <part>
  78.         <id>4</id>
  79.         <type>button</type>
  80.         <visible> <true /> </visible>
  81.         <reserved5> 0 </reserved5>
  82.         <reserved4> 0 </reserved4>
  83.         <reserved3> 0 </reserved3>
  84.         <reserved2> 0 </reserved2>
  85.         <reserved1> 0 </reserved1>
  86.         <enabled> <true /> </enabled>
  87.         <rect>
  88.             <left>42</left>
  89.             <top>306</top>
  90.             <right>145</right>
  91.             <bottom>329</bottom>
  92.         </rect>
  93.         <style>transparent</style>
  94.         <showName> <false /> </showName>
  95.         <highlight> <false /> </highlight>
  96.         <autoHighlight> <true /> </autoHighlight>
  97.         <sharedHighlight> <true /> </sharedHighlight>
  98.         <family>0</family>
  99.         <titleWidth>0</titleWidth>
  100.         <icon>0</icon>
  101.         <textAlign>center</textAlign>
  102.         <font>Chicago</font>
  103.         <textSize>12</textSize>
  104.         <textStyle>plain</textStyle>
  105.         <name></name>
  106.         <script>on mouseUp--answer "This demo will not report errorsΓÇöyou're on your own."ask "Enter all the arguments you want to use. (e.g. 15,0,0,,,1984)"if the result is "Cancel" then exit mouseupput it into args--domenu "message"put the blindtyping into myblindset the blindtyping to truetype "SetTimeDate" && args & returnput the result into myresset the blindtyping to myblindupdatetimeif word 1 of myres is "Error" thenbeepanswer myreselseanswer "Done!"end ifend mouseUp</script>
  107.     </part>
  108.     <part>
  109.         <id>5</id>
  110.         <type>button</type>
  111.         <visible> <true /> </visible>
  112.         <reserved5> 0 </reserved5>
  113.         <reserved4> 0 </reserved4>
  114.         <reserved3> 0 </reserved3>
  115.         <reserved2> 0 </reserved2>
  116.         <reserved1> 0 </reserved1>
  117.         <enabled> <true /> </enabled>
  118.         <rect>
  119.             <left>170</left>
  120.             <top>306</top>
  121.             <right>273</right>
  122.             <bottom>329</bottom>
  123.         </rect>
  124.         <style>transparent</style>
  125.         <showName> <false /> </showName>
  126.         <highlight> <false /> </highlight>
  127.         <autoHighlight> <true /> </autoHighlight>
  128.         <sharedHighlight> <true /> </sharedHighlight>
  129.         <family>0</family>
  130.         <titleWidth>0</titleWidth>
  131.         <icon>0</icon>
  132.         <textAlign>center</textAlign>
  133.         <font>Chicago</font>
  134.         <textSize>12</textSize>
  135.         <textStyle>plain</textStyle>
  136.         <name></name>
  137.         <script>on mouseUpset the scroll of cd fld "source" to 0show cd fld "source"end mouseUp</script>
  138.     </part>
  139.     <part>
  140.         <id>6</id>
  141.         <type>button</type>
  142.         <visible> <true /> </visible>
  143.         <reserved5> 0 </reserved5>
  144.         <reserved4> 0 </reserved4>
  145.         <reserved3> 0 </reserved3>
  146.         <reserved2> 0 </reserved2>
  147.         <reserved1> 0 </reserved1>
  148.         <enabled> <true /> </enabled>
  149.         <rect>
  150.             <left>365</left>
  151.             <top>313</top>
  152.             <right>388</right>
  153.             <bottom>335</bottom>
  154.         </rect>
  155.         <style>transparent</style>
  156.         <showName> <false /> </showName>
  157.         <highlight> <false /> </highlight>
  158.         <autoHighlight> <true /> </autoHighlight>
  159.         <sharedHighlight> <true /> </sharedHighlight>
  160.         <family>0</family>
  161.         <titleWidth>0</titleWidth>
  162.         <icon>1014</icon>
  163.         <textAlign>center</textAlign>
  164.         <font>Chicago</font>
  165.         <textSize>12</textSize>
  166.         <textStyle>plain</textStyle>
  167.         <name></name>
  168.         <script>on mouseUpvisual wipe rightgo prev cdend mouseUp</script>
  169.     </part>
  170.     <part>
  171.         <id>7</id>
  172.         <type>button</type>
  173.         <visible> <true /> </visible>
  174.         <reserved5> 0 </reserved5>
  175.         <reserved4> 0 </reserved4>
  176.         <reserved3> 0 </reserved3>
  177.         <reserved2> 0 </reserved2>
  178.         <reserved1> 0 </reserved1>
  179.         <enabled> <true /> </enabled>
  180.         <rect>
  181.             <left>396</left>
  182.             <top>313</top>
  183.             <right>419</right>
  184.             <bottom>335</bottom>
  185.         </rect>
  186.         <style>transparent</style>
  187.         <showName> <false /> </showName>
  188.         <highlight> <false /> </highlight>
  189.         <autoHighlight> <true /> </autoHighlight>
  190.         <sharedHighlight> <true /> </sharedHighlight>
  191.         <family>0</family>
  192.         <titleWidth>0</titleWidth>
  193.         <icon>1013</icon>
  194.         <textAlign>center</textAlign>
  195.         <font>Chicago</font>
  196.         <textSize>12</textSize>
  197.         <textStyle>plain</textStyle>
  198.         <name></name>
  199.         <script>on mouseUpvisual wipe leftgo next cdend mouseUp</script>
  200.     </part>
  201.     <part>
  202.         <id>8</id>
  203.         <type>button</type>
  204.         <visible> <true /> </visible>
  205.         <reserved5> 0 </reserved5>
  206.         <reserved4> 0 </reserved4>
  207.         <reserved3> 0 </reserved3>
  208.         <reserved2> 0 </reserved2>
  209.         <reserved1> 0 </reserved1>
  210.         <enabled> <true /> </enabled>
  211.         <rect>
  212.             <left>435</left>
  213.             <top>313</top>
  214.             <right>458</right>
  215.             <bottom>335</bottom>
  216.         </rect>
  217.         <style>transparent</style>
  218.         <showName> <false /> </showName>
  219.         <highlight> <false /> </highlight>
  220.         <autoHighlight> <true /> </autoHighlight>
  221.         <sharedHighlight> <true /> </sharedHighlight>
  222.         <family>0</family>
  223.         <titleWidth>0</titleWidth>
  224.         <icon>1012</icon>
  225.         <textAlign>center</textAlign>
  226.         <font>Chicago</font>
  227.         <textSize>12</textSize>
  228.         <textStyle>plain</textStyle>
  229.         <name></name>
  230.         <script>on mouseUpvisual iris closego first cdend mouseUp</script>
  231.     </part>
  232.     <part>
  233.         <id>9</id>
  234.         <type>field</type>
  235.         <visible> <true /> </visible>
  236.         <dontWrap> <false /> </dontWrap>
  237.         <dontSearch> <false /> </dontSearch>
  238.         <sharedText> <false /> </sharedText>
  239.         <fixedLineHeight> <false /> </fixedLineHeight>
  240.         <autoTab> <false /> </autoTab>
  241.         <lockText> <true /> </lockText>
  242.         <rect>
  243.             <left>14</left>
  244.             <top>239</top>
  245.             <right>217</right>
  246.             <bottom>275</bottom>
  247.         </rect>
  248.         <style>shadow</style>
  249.         <autoSelect> <false /> </autoSelect>
  250.         <showLines> <false /> </showLines>
  251.         <wideMargins> <false /> </wideMargins>
  252.         <multipleLines> <false /> </multipleLines>
  253.         <reservedFamily> 0 </reservedFamily>
  254.         <titleWidth>0</titleWidth>
  255.         <icon>0</icon>
  256.         <textAlign>center</textAlign>
  257.         <font>Palatino</font>
  258.         <textSize>14</textSize>
  259.         <textStyle>plain</textStyle>
  260.         <textHeight>18</textHeight>
  261.         <name>clock</name>
  262.         <script></script>
  263.     </part>
  264.     <part>
  265.         <id>1</id>
  266.         <type>field</type>
  267.         <visible> <false /> </visible>
  268.         <dontWrap> <false /> </dontWrap>
  269.         <dontSearch> <false /> </dontSearch>
  270.         <sharedText> <false /> </sharedText>
  271.         <fixedLineHeight> <false /> </fixedLineHeight>
  272.         <autoTab> <false /> </autoTab>
  273.         <lockText> <true /> </lockText>
  274.         <rect>
  275.             <left>6</left>
  276.             <top>26</top>
  277.             <right>504</right>
  278.             <bottom>334</bottom>
  279.         </rect>
  280.         <style>scrolling</style>
  281.         <autoSelect> <false /> </autoSelect>
  282.         <showLines> <false /> </showLines>
  283.         <wideMargins> <false /> </wideMargins>
  284.         <multipleLines> <false /> </multipleLines>
  285.         <reservedFamily> 0 </reservedFamily>
  286.         <titleWidth>0</titleWidth>
  287.         <icon>0</icon>
  288.         <textAlign>left</textAlign>
  289.         <font>Geneva</font>
  290.         <textSize>9</textSize>
  291.         <textStyle>plain</textStyle>
  292.         <textHeight>12</textHeight>
  293.         <name>source</name>
  294.         <script>on mousedownhide meend mousedown</script>
  295.     </part>
  296.     <content>
  297.         <layer>card</layer>
  298.         <id>2</id>
  299.         <text><span class="style5">etTimeDate XCMD</span><span class="style1">This XCMD set the date and time of the Macintosh's clock. It is analagous to the ToolBox routine, SetDateTime.Form:</span><span class="style11">SetTimeDate hour,minute,second,month,day,year</span><span class="style1"> All arguments are optional. Arguments left empty are unchanged.Examples:</span><span class="style11">SetTimeDate ,,,1,15,1991</span><span class="style1">    This sets the date to January 15, 1991 and leaves the time of day unchanged.</span><span class="style11">SetTimeDate 15,0,0</span><span class="style1">    This sets the time to 3:00:00 PM</span></text>
  300.     </content>
  301.     <content>
  302.         <layer>card</layer>
  303.         <id>3</id>
  304.         <text><span class="style3">ote:The hour should be specified in 24 hour format.     Invalid integer arguments and arguments out of range return errors.</span></text>
  305.     </content>
  306.     <content>
  307.         <layer>card</layer>
  308.         <id>9</id>
  309.         <text>Friday, February 1, 19916:58:50 PM</text>
  310.     </content>
  311.     <content>
  312.         <layer>card</layer>
  313.         <id>1</id>
  314.         <text>{    Name: SetTimeDate    }{        This XCMD set the date and time of the Macintosh's clock. It is analagous to the ToolBox    }{        routine, SetDateTime.    }{    }{    By : Len Saaf    }{        January, 1991    }{        ┬⌐1991 Raleigh Associates    }{        Free for non-commercial use    }{        Developed with THINK Pascal 3.0, ┬⌐1990 SYMANTEC Corp.    }{    }{    Form: SetTimeDate hour,minute,second,month,day,year    }{        All arguments are optional. Arguments left blank are unchanged.    }{    }{    Example: SetTimeDate ,,,1,15,1991    }{                    This sets the date to January 15, 1991 and leaves the time of day unchanged.    }{                SetTimeDate 15,0,0    }{                    This sets the time to 3:00:00 PM    }{    }{    Note:    }{        The hour should be specified in 24 hour format.    }{        Invalid integer arguments and arguments out of range return an error.    }{    }{    Include the following files in the project:    }{        DRVRRuntime.lib    }{        Interface.lib    }{        SANE.p    }{        SANELib.lib    }{        HyperXCmd.p    }{        HyperXLib.o    }{        SetTimeDate.p    }unit DummyUnit;interface    uses        HyperXCmd, SANE;    procedure Main (paramPtr: XCmdPtr);implementation    procedure Main (paramPtr: XCmdPtr);        const            Version = 'SetTimeDate XCMD 1.0 ┬⌐Raleigh Associates 1991 - Sets the date and time of the clock';            Usage = 'Usage: SetTimeDate hour, minute, second, month, day, year All arguments optional.';            MinArgs = 1;            MaxArgs = 6;        var            str: str255;        procedure CleanUpAndExit;        begin{ nothing to clean up }            exit(Main);        end; { CleanUpAndExit }        procedure Error (paramPtr: XCmdPtr; errStr: str255);        begin            errStr := concat('Error from SetTimeDate : ', errStr);            paramPtr^.returnValue := PasToZero(paramPtr, errStr);            CleanUpAndExit;        end; { Error }        function ReadInteger (paramPtr: XCmdPtr; paramNo: integer; var myInt: integer): Boolean;{ Reads a specified parameter and validates it using SANE routines }            var                d: Decimal;                validPrefix: Boolean;                myExt: extended;                index: integer;        begin            if (paramNo > paramPtr^.paramCount) or (paramNo < 1) then                ReadInteger := False            else                begin                    index := 0;                    CStr2Dec(CStrPtr(paramPtr^.params[paramNo]^), index, d, validPrefix);                    if not validPrefix then                        ReadInteger := False                    else                        begin                            myExt := Dec2Num(d);                            case ClassComp(myExt) of                                ZeroNum, NormalNum:                                     if (abs(myExt) < maxint) then                                        begin                                            myInt := round(myExt);                                            ReadInteger := True;                                        end                                    else                                        ReadInteger := False;                                otherwise                                    ReadInteger := False;                            end; { case }                        end; { if }                end; { if }        end; { ReadInteger }        procedure InitProc (paramPtr: XCmdPtr); {  }            var                str: str255;        begin            paramPtr^.returnValue := nil;            paramPtr^.passflag := FALSE;            if paramPtr^.paramCount = 1 then                begin                    ZeroToPas(paramPtr, paramPtr^.params[1]^, str);                    if (str = '!') or (str = '?') then                        begin                            if str = '!' then                                paramPtr^.returnValue := PasToZero(paramPtr, Version)                            else                                paramPtr^.returnValue := PasToZero(paramPtr, Usage);                            CleanUpAndExit;                        end; { if }                end; { if }            if (paramPtr^.paramCount < MinArgs) or (paramPtr^.paramCount > MaxArgs) then                Error(paramPtr, concat('Wrong number of arguments. ', Usage));        end; { InitProc }        procedure ReturnProc (paramPtr: XCmdPtr); { puts the values into returnValue }        begin{ Nothing to return }            CleanUpAndExit;        end; { ReturnProc }        procedure SetTimeDate (paramPtr: XCmdPtr);            var                tHour, tMinute, tSecond, tMonth, tDay, tYear, mySecs: Longint;                myDateTime: DateTimeRec;                err: OSErr;                str: str255;                arg, pCount: integer;        begin{ Get the time and make a copy of the elements }            GetDateTime(mySecs);            Secs2Date(mySecs, myDateTime);            with myDateTime do                begin                    tHour := hour;                    tMinute := minute;                    tSecond := second;                    tMonth := month;                    tDay := day;                    tYear := year;                end; { with }{ read and check the arguments }            pCount := paramPtr^.paramCount;            ZeroToPas(paramPtr, paramPtr^.params[1]^, str);            if length(str) > 0 then { ignore if the argument is empty }                if ReadInteger(paramPtr, 1, arg) then                    if (arg >= 0) and (arg <= 23) then                        tHour := arg                    else                        Error(paramPtr, 'Hour out of range')                else                    Error(paramPtr, 'Invalid hour');            if pCount >= 2 then                begin                    ZeroToPas(paramPtr, paramPtr^.params[2]^, str);                    if length(str) > 0 then                        if ReadInteger(paramPtr, 2, arg) then                            if (arg >= 0) and (arg <= 59) then                                tMinute := arg                            else                                Error(paramPtr, 'Minute out of range')                        else                            Error(paramPtr, 'Invalid minute');                end; { if }            if pCount >= 3 then                begin                    ZeroToPas(paramPtr, paramPtr^.params[3]^, str);                    if length(str) > 0 then                        if ReadInteger(paramPtr, 3, arg) then                            if (arg >= 0) and (arg <= 59) then                                tSecond := arg                            else                                Error(paramPtr, 'Second out of range')                        else                            Error(paramPtr, 'Invalid second');                end; { if }            if pCount >= 4 then                begin                    ZeroToPas(paramPtr, paramPtr^.params[4]^, str);                    if length(str) > 0 then                        if ReadInteger(paramPtr, 4, arg) then                            if (arg >= 1) and (arg <= 12) then                                tMonth := arg                            else                                Error(paramPtr, 'Month out of range')                        else                            Error(paramPtr, 'Invalid month');                end; { if }            if pCount >= 5 then                begin                    ZeroToPas(paramPtr, paramPtr^.params[5]^, str);                    if length(str) > 0 then                        if ReadInteger(paramPtr, 5, arg) then                            if (arg >= 1) and (arg <= 31) then                                tDay := arg                            else                                Error(paramPtr, 'Day out of range')                        else                            Error(paramPtr, 'Invalid day');                end; { if }            if pCount = 6 then                begin                    ZeroToPas(paramPtr, paramPtr^.params[6]^, str);                    if length(str) > 0 then                        if ReadInteger(paramPtr, 6, arg) then                            if (arg >= 1904) and (arg <= 2040) then                                tYear := arg                            else                                Error(paramPtr, 'Year out of range')                        else                            Error(paramPtr, 'Invalid year');                end; { if }{ write back all elements }            with myDateTime do                begin                    hour := tHour;                    minute := tMinute;                    second := tSecond;                    month := tMonth;                    day := tDay;                    year := tYear;                end; { with }            Date2Secs(myDateTime, mySecs);            err := SetDateTime(mySecs);            if err <> noErr then                Error(paramPtr, 'SetDateTime (Toolbox) returned error');        end; { SetTimeDate }    begin { Main }        InitProc(paramPtr);        SetTimeDate(paramPtr);        ReturnProc(paramPtr);    end; { Main }end. { implementation }</text>
  315.     </content>
  316.     <name>settimedate</name>
  317.     <script>on idleupdatetimepass idleend idleon updatetimeput the selectedchunk into mychunkput the long date & return & the long time into cd fld "clock"select mychunkend updatetime</script>
  318. </card>
  319.  
  320.  
  321. card_4422.xml
  322. <?xml version="1.0" encoding="utf-8" ?>
  323. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  324. <card>
  325.     <id>4422</id>
  326.     <filler1>0</filler1>
  327.     <bitmap>BMAP_4842.pbm</bitmap>
  328.     <cantDelete> <false /> </cantDelete>
  329.     <showPict> <true /> </showPict>
  330.     <dontSearch> <false /> </dontSearch>
  331.     <owner>2566</owner>
  332.     <link rel="stylesheet" type="text/css" href="stylesheet_3211.css" />
  333.     <part>
  334.         <id>2</id>
  335.         <type>field</type>
  336.         <visible> <true /> </visible>
  337.         <dontWrap> <false /> </dontWrap>
  338.         <dontSearch> <false /> </dontSearch>
  339.         <sharedText> <false /> </sharedText>
  340.         <fixedLineHeight> <false /> </fixedLineHeight>
  341.         <autoTab> <false /> </autoTab>
  342.         <lockText> <true /> </lockText>
  343.         <rect>
  344.             <left>5</left>
  345.             <top>24</top>
  346.             <right>508</right>
  347.             <bottom>304</bottom>
  348.         </rect>
  349.         <style>transparent</style>
  350.         <autoSelect> <false /> </autoSelect>
  351.         <showLines> <false /> </showLines>
  352.         <wideMargins> <false /> </wideMargins>
  353.         <multipleLines> <false /> </multipleLines>
  354.         <reservedFamily> 0 </reservedFamily>
  355.         <titleWidth>0</titleWidth>
  356.         <icon>0</icon>
  357.         <textAlign>left</textAlign>
  358.         <font>Palatino</font>
  359.         <textSize>12</textSize>
  360.         <textStyle>plain</textStyle>
  361.         <textHeight>16</textHeight>
  362.         <name></name>
  363.         <script></script>
  364.     </part>
  365.     <part>
  366.         <id>3</id>
  367.         <type>field</type>
  368.         <visible> <true /> </visible>
  369.         <dontWrap> <false /> </dontWrap>
  370.         <dontSearch> <false /> </dontSearch>
  371.         <sharedText> <false /> </sharedText>
  372.         <fixedLineHeight> <false /> </fixedLineHeight>
  373.         <autoTab> <false /> </autoTab>
  374.         <lockText> <true /> </lockText>
  375.         <rect>
  376.             <left>363</left>
  377.             <top>166</top>
  378.             <right>496</right>
  379.             <bottom>285</bottom>
  380.         </rect>
  381.         <style>shadow</style>
  382.         <autoSelect> <false /> </autoSelect>
  383.         <showLines> <false /> </showLines>
  384.         <wideMargins> <false /> </wideMargins>
  385.         <multipleLines> <false /> </multipleLines>
  386.         <reservedFamily> 0 </reservedFamily>
  387.         <titleWidth>0</titleWidth>
  388.         <icon>0</icon>
  389.         <textAlign>left</textAlign>
  390.         <font>Geneva</font>
  391.         <textSize>12</textSize>
  392.         <textStyle>plain</textStyle>
  393.         <textHeight>16</textHeight>
  394.         <name></name>
  395.         <script></script>
  396.     </part>
  397.     <part>
  398.         <id>4</id>
  399.         <type>button</type>
  400.         <visible> <true /> </visible>
  401.         <reserved5> 0 </reserved5>
  402.         <reserved4> 0 </reserved4>
  403.         <reserved3> 0 </reserved3>
  404.         <reserved2> 0 </reserved2>
  405.         <reserved1> 0 </reserved1>
  406.         <enabled> <true /> </enabled>
  407.         <rect>
  408.             <left>42</left>
  409.             <top>306</top>
  410.             <right>145</right>
  411.             <bottom>329</bottom>
  412.         </rect>
  413.         <style>transparent</style>
  414.         <showName> <false /> </showName>
  415.         <highlight> <false /> </highlight>
  416.         <autoHighlight> <true /> </autoHighlight>
  417.         <sharedHighlight> <true /> </sharedHighlight>
  418.         <family>0</family>
  419.         <titleWidth>0</titleWidth>
  420.         <icon>0</icon>
  421.         <textAlign>center</textAlign>
  422.         <font>Chicago</font>
  423.         <textSize>12</textSize>
  424.         <textStyle>plain</textStyle>
  425.         <name></name>
  426.         <script>on mouseUpask "Enter your latitude: (negative for south)"if the result is "Cancel" then exit mouseUpput it into latask "Enter your longitude: (negative for west)"if the result is "Cancel" then exit mouseupput it into lonask "Enter your time zone difference from UTC: (-5 for EST)"if the result is "Cancel" then exit mouseupput it into tzSetLocale lat,lon,tzput the result into myresif word 1 of myres is "Error" thenbeepanswer myreselseanswer "Done!"end ifend mouseUp</script>
  427.     </part>
  428.     <part>
  429.         <id>5</id>
  430.         <type>button</type>
  431.         <visible> <true /> </visible>
  432.         <reserved5> 0 </reserved5>
  433.         <reserved4> 0 </reserved4>
  434.         <reserved3> 0 </reserved3>
  435.         <reserved2> 0 </reserved2>
  436.         <reserved1> 0 </reserved1>
  437.         <enabled> <true /> </enabled>
  438.         <rect>
  439.             <left>170</left>
  440.             <top>306</top>
  441.             <right>273</right>
  442.             <bottom>329</bottom>
  443.         </rect>
  444.         <style>transparent</style>
  445.         <showName> <false /> </showName>
  446.         <highlight> <false /> </highlight>
  447.         <autoHighlight> <true /> </autoHighlight>
  448.         <sharedHighlight> <true /> </sharedHighlight>
  449.         <family>0</family>
  450.         <titleWidth>0</titleWidth>
  451.         <icon>0</icon>
  452.         <textAlign>center</textAlign>
  453.         <font>Chicago</font>
  454.         <textSize>12</textSize>
  455.         <textStyle>plain</textStyle>
  456.         <name></name>
  457.         <script>on mouseUpset the scroll of cd fld "source" to 0show cd fld "source"end mouseUp</script>
  458.     </part>
  459.     <part>
  460.         <id>6</id>
  461.         <type>button</type>
  462.         <visible> <true /> </visible>
  463.         <reserved5> 0 </reserved5>
  464.         <reserved4> 0 </reserved4>
  465.         <reserved3> 0 </reserved3>
  466.         <reserved2> 0 </reserved2>
  467.         <reserved1> 0 </reserved1>
  468.         <enabled> <true /> </enabled>
  469.         <rect>
  470.             <left>365</left>
  471.             <top>313</top>
  472.             <right>388</right>
  473.             <bottom>335</bottom>
  474.         </rect>
  475.         <style>transparent</style>
  476.         <showName> <false /> </showName>
  477.         <highlight> <false /> </highlight>
  478.         <autoHighlight> <true /> </autoHighlight>
  479.         <sharedHighlight> <true /> </sharedHighlight>
  480.         <family>0</family>
  481.         <titleWidth>0</titleWidth>
  482.         <icon>1014</icon>
  483.         <textAlign>center</textAlign>
  484.         <font>Chicago</font>
  485.         <textSize>12</textSize>
  486.         <textStyle>plain</textStyle>
  487.         <name></name>
  488.         <script>on mouseUpvisual wipe rightgo prev cdend mouseUp</script>
  489.     </part>
  490.     <part>
  491.         <id>7</id>
  492.         <type>button</type>
  493.         <visible> <true /> </visible>
  494.         <reserved5> 0 </reserved5>
  495.         <reserved4> 0 </reserved4>
  496.         <reserved3> 0 </reserved3>
  497.         <reserved2> 0 </reserved2>
  498.         <reserved1> 0 </reserved1>
  499.         <enabled> <true /> </enabled>
  500.         <rect>
  501.             <left>396</left>
  502.             <top>313</top>
  503.             <right>419</right>
  504.             <bottom>335</bottom>
  505.         </rect>
  506.         <style>transparent</style>
  507.         <showName> <false /> </showName>
  508.         <highlight> <false /> </highlight>
  509.         <autoHighlight> <true /> </autoHighlight>
  510.         <sharedHighlight> <true /> </sharedHighlight>
  511.         <family>0</family>
  512.         <titleWidth>0</titleWidth>
  513.         <icon>1013</icon>
  514.         <textAlign>center</textAlign>
  515.         <font>Chicago</font>
  516.         <textSize>12</textSize>
  517.         <textStyle>plain</textStyle>
  518.         <name></name>
  519.         <script>on mouseUpvisual wipe leftgo next cdend mouseUp</script>
  520.     </part>
  521.     <part>
  522.         <id>8</id>
  523.         <type>button</type>
  524.         <visible> <true /> </visible>
  525.         <reserved5> 0 </reserved5>
  526.         <reserved4> 0 </reserved4>
  527.         <reserved3> 0 </reserved3>
  528.         <reserved2> 0 </reserved2>
  529.         <reserved1> 0 </reserved1>
  530.         <enabled> <true /> </enabled>
  531.         <rect>
  532.             <left>435</left>
  533.             <top>313</top>
  534.             <right>458</right>
  535.             <bottom>335</bottom>
  536.         </rect>
  537.         <style>transparent</style>
  538.         <showName> <false /> </showName>
  539.         <highlight> <false /> </highlight>
  540.         <autoHighlight> <true /> </autoHighlight>
  541.         <sharedHighlight> <true /> </sharedHighlight>
  542.         <family>0</family>
  543.         <titleWidth>0</titleWidth>
  544.         <icon>1012</icon>
  545.         <textAlign>center</textAlign>
  546.         <font>Chicago</font>
  547.         <textSize>12</textSize>
  548.         <textStyle>plain</textStyle>
  549.         <name></name>
  550.         <script>on mouseUpvisual iris closego first cdend mouseUp</script>
  551.     </part>
  552.     <part>
  553.         <id>1</id>
  554.         <type>field</type>
  555.         <visible> <false /> </visible>
  556.         <dontWrap> <false /> </dontWrap>
  557.         <dontSearch> <false /> </dontSearch>
  558.         <sharedText> <false /> </sharedText>
  559.         <fixedLineHeight> <false /> </fixedLineHeight>
  560.         <autoTab> <false /> </autoTab>
  561.         <lockText> <true /> </lockText>
  562.         <rect>
  563.             <left>6</left>
  564.             <top>26</top>
  565.             <right>504</right>
  566.             <bottom>334</bottom>
  567.         </rect>
  568.         <style>scrolling</style>
  569.         <autoSelect> <false /> </autoSelect>
  570.         <showLines> <false /> </showLines>
  571.         <wideMargins> <false /> </wideMargins>
  572.         <multipleLines> <false /> </multipleLines>
  573.         <reservedFamily> 0 </reservedFamily>
  574.         <titleWidth>0</titleWidth>
  575.         <icon>0</icon>
  576.         <textAlign>left</textAlign>
  577.         <font>Geneva</font>
  578.         <textSize>9</textSize>
  579.         <textStyle>plain</textStyle>
  580.         <textHeight>12</textHeight>
  581.         <name>source</name>
  582.         <script>on mousedownhide meend mousedown</script>
  583.     </part>
  584.     <content>
  585.         <layer>card</layer>
  586.         <id>1</id>
  587.         <text>{    Name: SetLocale}{        This XCMD set location information that is stored in the Macintosh's}{        parameter RAM. This information is normally set using the Map cdev}{        (a part of Apple system software). The location information can be}{        read with the GetLocale XCMD that accompanies this XCMD.}{}{    By : Len Saaf}{        January, 1991}{        ┬⌐1991 Raleigh Associates}{        Free for non-commercial use}{        Developed with THINK Pascal 3.0, ┬⌐1990 SYMANTEC Corp.}{}{    Form: SetLocale latitude,longitude,UTCdifference,DSTdifference}{        The first word of the result is "Error" if an error has occurred.}{            1)    Latitude is in degrees (positive for north, negative for south)}{            2)    Longitude is in degrees (positive for east, negative for west)}{            3)    Difference from UTC (aka GMT) in hours}{            4)    A daylight savings time difference (undocumented as far as I can tell)}{}{    Example: SetLocale 43.25, -77.5, -5, 0}{        This sets the location to 43.25┬░ N, 77.5┬░ W}{        The UTC difference is set to -5 (EST)}{}{    Note:}{        Latitude & longitude should be in decimal form, not in degrees, minutes,}{        and secondsΓÇölikewise with the UTC difference in hours.}{}{    Include the following files in the project:}{        DRVRRuntime.lib}{        Interface.lib}{        SANE.p}{        SANElib.lib}{        FixMath.p}{        Script.p}{        HyperXCmd.p}{        HyperXLib.o}{        SetLocale.p}unit DummyUnit;interface    uses        HyperXCmd, FixMath, Script, SANE;    procedure Main (paramPtr: XCmdPtr);implementation    procedure Main (paramPtr: XCmdPtr);        const            Version = 'SetLocale XCMD 1.0 ┬⌐Raleigh Associates 1991 - Sets location info in PRAM';            Usage = 'Usage: SetLocale latitude, longitude, <UTCdifference, <DSTdifference>>';            MinArgs = 2;            MaxArgs = 4;        procedure CleanUpAndExit;        begin{ nothing to clean up }            exit(Main);        end; { CleanUpAndExit }        procedure Error (paramPtr: XCmdPtr; errStr: str255);        begin            errStr := concat('Error from SetLocale : ', errStr);            paramPtr^.returnValue := PasToZero(paramPtr, errStr);            CleanUpAndExit;        end; { Error }        function ReadReal (paramPtr: XCmdPtr; paramNo: integer; var myReal: real): Boolean;{ Reads in a specified parameter and validates it using SANE routines }            const                maxreal = 3.4e38;            var                d: Decimal;                validPrefix: Boolean;                index: integer;                myExt: extended;        begin            if (paramNo > paramPtr^.paramCount) or (paramNo < 1) then                ReadReal := False            else                begin                    index := 0;                    CStr2Dec(CStrPtr(paramPtr^.params[paramNo]^), index, d, validPrefix);                    if not validPrefix then                        ReadReal := False                    else                        begin                            myExt := Dec2Num(d);                            case ClassExtended(myExt) of                                ZeroNum, NormalNum:                                     if (abs(myExt) < maxreal) then                                        begin                                            myReal := myExt;                                            ReadReal := True;                                        end                                    else                                        ReadReal := False;                                otherwise                                    ReadReal := False;                            end; { case }                        end; { if }                end; { if }        end; { ReadReal }        procedure InitProc (paramPtr: XCmdPtr); {  }            var                str: str255;        begin            paramPtr^.returnValue := nil;            paramPtr^.passflag := FALSE;            if paramPtr^.paramCount = 1 then                begin                    ZeroToPas(paramPtr, paramPtr^.params[1]^, str);                    if (str = '!') or (str = '?') then                        begin                            if str = '!' then                                paramPtr^.returnValue := PasToZero(paramPtr, Version)                            else                                paramPtr^.returnValue := PasToZero(paramPtr, Usage);                            CleanUpAndExit;                        end; { if }                end; { if }            if (paramPtr^.paramCount < MinArgs) or (paramPtr^.paramCount > MaxArgs) then                Error(paramPtr, concat('Wrong number of arguments. ', Usage));        end; { InitProc }        procedure ReturnProc (paramPtr: XCmdPtr); { puts the values into returnValue }        begin{ Nothing to return }            CleanUpAndExit;        end; { ReturnProc }        procedure SetLocale (paramPtr: XCmdPtr);            var                lat, lon, utcDiff, dlsDiff: real;                myLocale: MachineLocation;                tUTC: longint;                tDLS: SignedByte;                str: str255;                pCount: integer;        begin{ read and check the arguments }            pCount := paramPtr^.paramCount;            if ReadReal(paramPtr, 1, lat) then                if (lat >= -90) and (lat <= 90) then                else                    Error(paramPtr, 'Latitude out of range')            else                Error(paramPtr, 'Invalid latitude');            if pCount >= 2 then                begin                    if ReadReal(paramPtr, 2, lon) then                        if (lon >= -180) and (lon <= 180) then                        else                            Error(paramPtr, 'Longitude out of range')                    else                        Error(paramPtr, 'Invalid longitude');                end; { if }            if pCount >= 3 then                begin                    if ReadReal(paramPtr, 3, utcDiff) then                        if (utcDiff > -24) and (utcDiff < 24) then                        else                            Error(paramPtr, 'UTC difference out of range')                    else                        Error(paramPtr, 'Invalid UTC difference');                end; { if }            if pCount = 4 then                begin                    if ReadReal(paramPtr, 4, dlsDiff) then                        if (dlsDiff >= -127) and (dlsDiff < 128) then                        else                            Error(paramPtr, 'DLS difference out of range')                    else                        Error(paramPtr, 'Invalid DLS difference');                end; { if }            ReadLocation(myLocale); { Script Manager routine to get the info from PRAM }            myLocale.latitude := X2Frac(lat / 90);            myLocale.longitude := X2Frac(lon / 90);            if paramPtr^.paramCount >= 3 then                begin                    tDLS := myLocale.dlsDelta;                    tUTC := round(utcDiff * 3600);                    if pCount >= 4 then                        tDLS := round(dlsDiff);                    myLocale.gmtDelta := tUTC;                    myLocale.dlsDelta := tDLS;                end; { if }            WriteLocation(myLocale); { Script Manager routine to write the info to PRAM }        end; { SetLocale }    begin { Main }        InitProc(paramPtr);        SetLocale(paramPtr);        ReturnProc(paramPtr);    end; { Main }end. { implementation }</text>
  588.     </content>
  589.     <content>
  590.         <layer>card</layer>
  591.         <id>2</id>
  592.         <text><span class="style5">etLocale XCMD</span><span class="style1">This XCMD sets the location information that is stored in the Macintosh's parameter RAM. This information is normally set using the Map cdev (a part of Apple system software). The location information can be read with the GetLocale XCMD included in this stack. Form: </span><span class="style11">SetLocale latitude,longitude<,UTCdifference<,DSTdifference>></span><span class="style1">The last two arguments are optional. The arguments in detail:  1)    Latitude in degrees (positive for north, negative for south)  2)    Longitude in degrees (positive for east, negative for west)  3)    Difference from UTC (aka GMT) in hours  4)    A daylight savings time difference (undocumented      as far as I can tell)If the first word of the result is "Error" if an error has occurred.Example: </span><span class="style11">SetLocale 43.25,-77.5,-5</span><span class="style1">This sets the location to 43.25┬░ N, 77.5┬░ WThe UTC difference is set to -5 (EST)</span></text>
  593.     </content>
  594.     <content>
  595.         <layer>card</layer>
  596.         <id>3</id>
  597.         <text><span class="style3">ote:Latitude & longitude should be in decimal form, not in degrees, minutes, and secondsΓÇölikewise with the UTC difference in hours.</span></text>
  598.     </content>
  599.     <name>setlocale</name>
  600.     <script></script>
  601. </card>
  602.  
  603.  
  604. card_3597.xml
  605. <?xml version="1.0" encoding="utf-8" ?>
  606. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  607. <card>
  608.     <id>3597</id>
  609.     <filler1>0</filler1>
  610.     <bitmap>BMAP_4317.pbm</bitmap>
  611.     <cantDelete> <false /> </cantDelete>
  612.     <showPict> <true /> </showPict>
  613.     <dontSearch> <false /> </dontSearch>
  614.     <owner>2566</owner>
  615.     <link rel="stylesheet" type="text/css" href="stylesheet_3211.css" />
  616.     <part>
  617.         <id>2</id>
  618.         <type>field</type>
  619.         <visible> <true /> </visible>
  620.         <dontWrap> <false /> </dontWrap>
  621.         <dontSearch> <false /> </dontSearch>
  622.         <sharedText> <false /> </sharedText>
  623.         <fixedLineHeight> <false /> </fixedLineHeight>
  624.         <autoTab> <false /> </autoTab>
  625.         <lockText> <true /> </lockText>
  626.         <rect>
  627.             <left>5</left>
  628.             <top>24</top>
  629.             <right>508</right>
  630.             <bottom>304</bottom>
  631.         </rect>
  632.         <style>transparent</style>
  633.         <autoSelect> <false /> </autoSelect>
  634.         <showLines> <false /> </showLines>
  635.         <wideMargins> <false /> </wideMargins>
  636.         <multipleLines> <false /> </multipleLines>
  637.         <reservedFamily> 0 </reservedFamily>
  638.         <titleWidth>0</titleWidth>
  639.         <icon>0</icon>
  640.         <textAlign>left</textAlign>
  641.         <font>Palatino</font>
  642.         <textSize>12</textSize>
  643.         <textStyle>plain</textStyle>
  644.         <textHeight>16</textHeight>
  645.         <name></name>
  646.         <script></script>
  647.     </part>
  648.     <part>
  649.         <id>3</id>
  650.         <type>field</type>
  651.         <visible> <true /> </visible>
  652.         <dontWrap> <false /> </dontWrap>
  653.         <dontSearch> <false /> </dontSearch>
  654.         <sharedText> <false /> </sharedText>
  655.         <fixedLineHeight> <false /> </fixedLineHeight>
  656.         <autoTab> <false /> </autoTab>
  657.         <lockText> <true /> </lockText>
  658.         <rect>
  659.             <left>363</left>
  660.             <top>97</top>
  661.             <right>504</right>
  662.             <bottom>299</bottom>
  663.         </rect>
  664.         <style>shadow</style>
  665.         <autoSelect> <false /> </autoSelect>
  666.         <showLines> <false /> </showLines>
  667.         <wideMargins> <false /> </wideMargins>
  668.         <multipleLines> <false /> </multipleLines>
  669.         <reservedFamily> 0 </reservedFamily>
  670.         <titleWidth>0</titleWidth>
  671.         <icon>0</icon>
  672.         <textAlign>left</textAlign>
  673.         <font>Palatino</font>
  674.         <textSize>12</textSize>
  675.         <textStyle>plain</textStyle>
  676.         <textHeight>16</textHeight>
  677.         <name></name>
  678.         <script></script>
  679.     </part>
  680.     <part>
  681.         <id>4</id>
  682.         <type>button</type>
  683.         <visible> <true /> </visible>
  684.         <reserved5> 0 </reserved5>
  685.         <reserved4> 0 </reserved4>
  686.         <reserved3> 0 </reserved3>
  687.         <reserved2> 0 </reserved2>
  688.         <reserved1> 0 </reserved1>
  689.         <enabled> <true /> </enabled>
  690.         <rect>
  691.             <left>42</left>
  692.             <top>306</top>
  693.             <right>145</right>
  694.             <bottom>329</bottom>
  695.         </rect>
  696.         <style>transparent</style>
  697.         <showName> <false /> </showName>
  698.         <highlight> <false /> </highlight>
  699.         <autoHighlight> <true /> </autoHighlight>
  700.         <sharedHighlight> <true /> </sharedHighlight>
  701.         <family>0</family>
  702.         <titleWidth>0</titleWidth>
  703.         <icon>0</icon>
  704.         <textAlign>center</textAlign>
  705.         <font>Chicago</font>
  706.         <textSize>12</textSize>
  707.         <textStyle>plain</textStyle>
  708.         <name></name>
  709.         <script>on mouseUpGetLocaleput the result into myresif word 1 of myres is "Error" thenbeepput return &┬¼"Error returned" & return & return & "XCMD returned:" ┬¼&& myres into tmpelseput return & "XCMD returned:" && myres & return & return into tmpput "Latitude:" && abs(item 1 of myres) after tmpif (item 1 of myres) < 0  thenput " South" after tmpelseput " North" after tmpend ifput return & "Longitude:" && abs(item 2 of myres) after tmpif (item 2 of myres) < 0  thenput " West" after tmpelseput " East" after tmpend ifput return & return after tmpif (item 3 of myres) < 0 thenput abs(item 3 of myres) && "hours behind UTC" after tmpelseput abs(item 3 of myres) && "hours ahead of UTC" after tmpend ifend ifput return & return & "Click to hide." after tmpput tmp into cd fld "results"show cd fld "results"end mouseUp</script>
  710.     </part>
  711.     <part>
  712.         <id>5</id>
  713.         <type>button</type>
  714.         <visible> <true /> </visible>
  715.         <reserved5> 0 </reserved5>
  716.         <reserved4> 0 </reserved4>
  717.         <reserved3> 0 </reserved3>
  718.         <reserved2> 0 </reserved2>
  719.         <reserved1> 0 </reserved1>
  720.         <enabled> <true /> </enabled>
  721.         <rect>
  722.             <left>170</left>
  723.             <top>306</top>
  724.             <right>273</right>
  725.             <bottom>329</bottom>
  726.         </rect>
  727.         <style>transparent</style>
  728.         <showName> <false /> </showName>
  729.         <highlight> <false /> </highlight>
  730.         <autoHighlight> <true /> </autoHighlight>
  731.         <sharedHighlight> <true /> </sharedHighlight>
  732.         <family>0</family>
  733.         <titleWidth>0</titleWidth>
  734.         <icon>0</icon>
  735.         <textAlign>center</textAlign>
  736.         <font>Chicago</font>
  737.         <textSize>12</textSize>
  738.         <textStyle>plain</textStyle>
  739.         <name></name>
  740.         <script>on mouseUpset the scroll of cd fld "source" to 0show cd fld "source"end mouseUp</script>
  741.     </part>
  742.     <part>
  743.         <id>6</id>
  744.         <type>button</type>
  745.         <visible> <true /> </visible>
  746.         <reserved5> 0 </reserved5>
  747.         <reserved4> 0 </reserved4>
  748.         <reserved3> 0 </reserved3>
  749.         <reserved2> 0 </reserved2>
  750.         <reserved1> 0 </reserved1>
  751.         <enabled> <true /> </enabled>
  752.         <rect>
  753.             <left>365</left>
  754.             <top>313</top>
  755.             <right>388</right>
  756.             <bottom>335</bottom>
  757.         </rect>
  758.         <style>transparent</style>
  759.         <showName> <false /> </showName>
  760.         <highlight> <false /> </highlight>
  761.         <autoHighlight> <true /> </autoHighlight>
  762.         <sharedHighlight> <true /> </sharedHighlight>
  763.         <family>0</family>
  764.         <titleWidth>0</titleWidth>
  765.         <icon>1014</icon>
  766.         <textAlign>center</textAlign>
  767.         <font>Chicago</font>
  768.         <textSize>12</textSize>
  769.         <textStyle>plain</textStyle>
  770.         <name></name>
  771.         <script>on mouseUpvisual wipe rightgo prev cdend mouseUp</script>
  772.     </part>
  773.     <part>
  774.         <id>7</id>
  775.         <type>button</type>
  776.         <visible> <true /> </visible>
  777.         <reserved5> 0 </reserved5>
  778.         <reserved4> 0 </reserved4>
  779.         <reserved3> 0 </reserved3>
  780.         <reserved2> 0 </reserved2>
  781.         <reserved1> 0 </reserved1>
  782.         <enabled> <true /> </enabled>
  783.         <rect>
  784.             <left>396</left>
  785.             <top>313</top>
  786.             <right>419</right>
  787.             <bottom>335</bottom>
  788.         </rect>
  789.         <style>transparent</style>
  790.         <showName> <false /> </showName>
  791.         <highlight> <false /> </highlight>
  792.         <autoHighlight> <true /> </autoHighlight>
  793.         <sharedHighlight> <true /> </sharedHighlight>
  794.         <family>0</family>
  795.         <titleWidth>0</titleWidth>
  796.         <icon>1013</icon>
  797.         <textAlign>center</textAlign>
  798.         <font>Chicago</font>
  799.         <textSize>12</textSize>
  800.         <textStyle>plain</textStyle>
  801.         <name></name>
  802.         <script>on mouseUpvisual wipe leftgo next cdend mouseUp</script>
  803.     </part>
  804.     <part>
  805.         <id>8</id>
  806.         <type>button</type>
  807.         <visible> <true /> </visible>
  808.         <reserved5> 0 </reserved5>
  809.         <reserved4> 0 </reserved4>
  810.         <reserved3> 0 </reserved3>
  811.         <reserved2> 0 </reserved2>
  812.         <reserved1> 0 </reserved1>
  813.         <enabled> <true /> </enabled>
  814.         <rect>
  815.             <left>435</left>
  816.             <top>313</top>
  817.             <right>458</right>
  818.             <bottom>335</bottom>
  819.         </rect>
  820.         <style>transparent</style>
  821.         <showName> <false /> </showName>
  822.         <highlight> <false /> </highlight>
  823.         <autoHighlight> <true /> </autoHighlight>
  824.         <sharedHighlight> <true /> </sharedHighlight>
  825.         <family>0</family>
  826.         <titleWidth>0</titleWidth>
  827.         <icon>1012</icon>
  828.         <textAlign>center</textAlign>
  829.         <font>Chicago</font>
  830.         <textSize>12</textSize>
  831.         <textStyle>plain</textStyle>
  832.         <name></name>
  833.         <script>on mouseUpvisual iris closego first cdend mouseUp</script>
  834.     </part>
  835.     <part>
  836.         <id>1</id>
  837.         <type>field</type>
  838.         <visible> <false /> </visible>
  839.         <dontWrap> <false /> </dontWrap>
  840.         <dontSearch> <false /> </dontSearch>
  841.         <sharedText> <false /> </sharedText>
  842.         <fixedLineHeight> <false /> </fixedLineHeight>
  843.         <autoTab> <false /> </autoTab>
  844.         <lockText> <true /> </lockText>
  845.         <rect>
  846.             <left>6</left>
  847.             <top>26</top>
  848.             <right>504</right>
  849.             <bottom>334</bottom>
  850.         </rect>
  851.         <style>scrolling</style>
  852.         <autoSelect> <false /> </autoSelect>
  853.         <showLines> <false /> </showLines>
  854.         <wideMargins> <false /> </wideMargins>
  855.         <multipleLines> <false /> </multipleLines>
  856.         <reservedFamily> 0 </reservedFamily>
  857.         <titleWidth>0</titleWidth>
  858.         <icon>0</icon>
  859.         <textAlign>left</textAlign>
  860.         <font>Geneva</font>
  861.         <textSize>9</textSize>
  862.         <textStyle>plain</textStyle>
  863.         <textHeight>12</textHeight>
  864.         <name>source</name>
  865.         <script>on mousedownhide meend mousedown</script>
  866.     </part>
  867.     <part>
  868.         <id>9</id>
  869.         <type>field</type>
  870.         <visible> <false /> </visible>
  871.         <dontWrap> <false /> </dontWrap>
  872.         <dontSearch> <false /> </dontSearch>
  873.         <sharedText> <false /> </sharedText>
  874.         <fixedLineHeight> <false /> </fixedLineHeight>
  875.         <autoTab> <false /> </autoTab>
  876.         <lockText> <true /> </lockText>
  877.         <rect>
  878.             <left>102</left>
  879.             <top>71</top>
  880.             <right>423</right>
  881.             <bottom>257</bottom>
  882.         </rect>
  883.         <style>shadow</style>
  884.         <autoSelect> <false /> </autoSelect>
  885.         <showLines> <false /> </showLines>
  886.         <wideMargins> <false /> </wideMargins>
  887.         <multipleLines> <false /> </multipleLines>
  888.         <reservedFamily> 0 </reservedFamily>
  889.         <titleWidth>0</titleWidth>
  890.         <icon>0</icon>
  891.         <textAlign>left</textAlign>
  892.         <font>Palatino</font>
  893.         <textSize>14</textSize>
  894.         <textStyle>plain</textStyle>
  895.         <textHeight>18</textHeight>
  896.         <name>results</name>
  897.         <script>on mousedownhide meend mousedown</script>
  898.     </part>
  899.     <content>
  900.         <layer>card</layer>
  901.         <id>1</id>
  902.         <text>{    Name: GetLocale}{        This XCMD fetches location information that is stored in the Macintosh's}{        parameter RAM. This information can be set using the Map cdev}{        (a part of Apple system software) or by the SetLocale XCMD}{        that accopanies this XCMD.}{}{    Written by : Len Saaf}{        January, 1991}{        ┬⌐1991 Raleigh Associates}{        Free for non-commercial use}{        Developed with THINK Pascal 3.0, ┬⌐1990 SYMANTEC Corp.}{}{    Form: GetLocale}{        The first word of the result is "Error" if an error has occurred.}{        Otherwise, the result is a four-item container:}{            1)    Latitude in degrees (positive for north, negative for south)}{            2)    Longitude in degrees (positive for east, negative for west)}{            3)    Difference from UTC (aka GMT) in hours}{            4)    A daylight savings time difference (undocumented as far as I can tell)}{}{    Example: GetLocale}{        put the result into myLoc}{        put item 1 of myLoc into myLatitude}{        put item 2 of myLoc into myLongitude}{}{    Note:}{        Latitude & longitude are returned in decimal form, not in degrees, minutes,}{        and secondsΓÇölikewise with the UTC difference in hours.}{}{    Include the following files in the project:}{        DRVRRuntime.lib}{        Interface.lib}{        SANElib.lib}{        FixMath.p}{        Script.p}{        HyperXCmd.p}{        HyperXLib.o}{        GetLocale.p}unit DummyUnit;interface    uses        HyperXCmd, FixMath, Script;    procedure Main (paramPtr: XCmdPtr);implementation    procedure Main (paramPtr: XCmdPtr);        const            Version = 'GetLocale XCMD 1.0 ┬⌐Raleigh Associates 1991 - Gets location info from PRAM';            Usage = 'Usage: No arguments. Returns: Latitude, Longitude, UTCdifference, DaylightSavingsDifference';            MinArgs = 0;            MaxArgs = 0;        var            lat, lon, utcDiff, dlsDiff: real;        procedure CleanUpAndExit;        begin{ nothing to clean up }            exit(Main);        end; { CleanUpAndExit }        procedure Error (paramPtr: XCmdPtr; errStr: str255);        begin            errStr := concat('Error from GetLocale : ', errStr);            paramPtr^.returnValue := PasToZero(paramPtr, errStr);            CleanUpAndExit;        end; { Error }        procedure InitProc (paramPtr: XCmdPtr); {  }            var                str: str255;        begin            paramPtr^.returnValue := nil;            paramPtr^.passflag := FALSE;            if paramPtr^.paramCount = 1 then                begin                    ZeroToPas(paramPtr, paramPtr^.params[1]^, str);                    if (str = '!') or (str = '?') then                        begin                            if str = '!' then                                paramPtr^.returnValue := PasToZero(paramPtr, Version)                            else                                paramPtr^.returnValue := PasToZero(paramPtr, Usage);                            CleanUpAndExit;                        end; { if }                end; { if }            if (paramPtr^.paramCount < MinArgs) or (paramPtr^.paramCount > MaxArgs) then                Error(paramPtr, concat('Wrong number of arguments. ', Usage));        end; { InitProc }        procedure ReturnProc (paramPtr: XCmdPtr); { puts the values into returnValue }            var                str1, str2, str3, str4: str255;        begin            ExtToStr(paramPtr, lat, str1);            ExtToStr(paramPtr, lon, str2);            ExtToStr(paramPtr, utcDiff, str3);            ExtToStr(paramPtr, dlsDiff, str4);            str1 := concat(str1, ',', str2, ',', str3, ',', str4);            if (lat = 0) and (lon = 0) and (utcDiff = 0) then { all are zero if the PRAM is empty or zapped }                Error(paramPtr, 'Location information has not been set!')            else                paramPtr^.returnValue := PasToZero(paramPtr, str1);            CleanUpAndExit;        end; { ReturnProc }        procedure GetLocale (paramPtr: XCmdPtr);            var                myLocale: MachineLocation;                iutcdelta: longint;                mybyte: SignedByte;        begin            ReadLocation(myLocale); { this is the Script Manager routine that extracts the data from the PRAM }            lat := Frac2X(myLocale.latitude) * 90;            lon := Frac2X(myLocale.longitude) * 90;            iutcdelta := BAnd(myLocale.gmtDelta, $00FFFFFF);            if BTst(iutcdelta, 23) then                iutcdelta := BOr(iutcdelta, $FF000000);            utcDiff := iutcdelta / 3600;            mybyte := myLocale.dlsDelta;            dlsDiff := mybyte;        end; { GetLocale }    begin { Main }        InitProc(paramPtr);        GetLocale(paramPtr);        ReturnProc(paramPtr);    end; { Main }end. { implementation }</text>
  903.     </content>
  904.     <content>
  905.         <layer>card</layer>
  906.         <id>2</id>
  907.         <text><span class="style5">etLocale XCMD</span><span class="style1">This XCMD fetches location information stored in the Macintosh's parameter RAM. This information can be set using the Map cdev    (a part of Apple system software) or by the SetLocale XCMD included in this stack.</span><span class="style6"></span><span class="style1">Form: </span><span class="style11">GetLocale</span><span class="style1">The first word of the result is "Error" if an error has occurred.Otherwise, the result is a four-item container:  1)    Latitude in degrees (positive for north, negative for south)     2)    Longitude in degrees (positive for east, negative for west)     3)    Difference from UTC (aka GMT) in hours     4)    A daylight savings time difference (undocumented as far      as I can tell)Example: </span><span class="style11">GetLocaleput the result into myLocput item 1 of myLoc into myLatitudeput item 2 of myLoc into myLongitude</span><span class="style1"></span></text>
  908.     </content>
  909.     <content>
  910.         <layer>card</layer>
  911.         <id>3</id>
  912.         <text>Notes:    Latitude & longitude are returned in decimal form, not in degrees, minutes,    and secondsΓÇölikewise with the UTC difference in hours.If the location has never been set, or if the PRAM has been zapped, the XCMD returns an error.</text>
  913.     </content>
  914.     <content>
  915.         <layer>card</layer>
  916.         <id>9</id>
  917.         <text>XCMD returned: 43.25,-77.5,-5,0Latitude: 43.25 NorthLongitude: 77.5 West5 hours behind UTCClick to hide.</text>
  918.     </content>
  919.     <name>getlocale</name>
  920.     <script></script>
  921. </card>
  922.  
  923.  
  924. card_3026.xml
  925. <?xml version="1.0" encoding="utf-8" ?>
  926. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  927. <card>
  928.     <id>3026</id>
  929.     <filler1>0</filler1>
  930.     <bitmap>BMAP_3863.pbm</bitmap>
  931.     <cantDelete> <false /> </cantDelete>
  932.     <showPict> <true /> </showPict>
  933.     <dontSearch> <false /> </dontSearch>
  934.     <owner>2566</owner>
  935.     <link rel="stylesheet" type="text/css" href="stylesheet_3211.css" />
  936.     <part>
  937.         <id>1</id>
  938.         <type>field</type>
  939.         <visible> <true /> </visible>
  940.         <dontWrap> <false /> </dontWrap>
  941.         <dontSearch> <false /> </dontSearch>
  942.         <sharedText> <false /> </sharedText>
  943.         <fixedLineHeight> <false /> </fixedLineHeight>
  944.         <autoTab> <false /> </autoTab>
  945.         <lockText> <false /> </lockText>
  946.         <rect>
  947.             <left>13</left>
  948.             <top>31</top>
  949.             <right>502</right>
  950.             <bottom>250</bottom>
  951.         </rect>
  952.         <style>transparent</style>
  953.         <autoSelect> <false /> </autoSelect>
  954.         <showLines> <false /> </showLines>
  955.         <wideMargins> <false /> </wideMargins>
  956.         <multipleLines> <false /> </multipleLines>
  957.         <reservedFamily> 0 </reservedFamily>
  958.         <titleWidth>0</titleWidth>
  959.         <icon>0</icon>
  960.         <textAlign>left</textAlign>
  961.         <font>Geneva</font>
  962.         <textSize>12</textSize>
  963.         <textStyle>plain</textStyle>
  964.         <textHeight>16</textHeight>
  965.         <name></name>
  966.         <script></script>
  967.     </part>
  968.     <part>
  969.         <id>6</id>
  970.         <type>field</type>
  971.         <visible> <true /> </visible>
  972.         <dontWrap> <false /> </dontWrap>
  973.         <dontSearch> <false /> </dontSearch>
  974.         <sharedText> <false /> </sharedText>
  975.         <fixedLineHeight> <false /> </fixedLineHeight>
  976.         <autoTab> <false /> </autoTab>
  977.         <lockText> <true /> </lockText>
  978.         <rect>
  979.             <left>279</left>
  980.             <top>259</top>
  981.             <right>403</right>
  982.             <bottom>335</bottom>
  983.         </rect>
  984.         <style>rectangle</style>
  985.         <autoSelect> <false /> </autoSelect>
  986.         <showLines> <false /> </showLines>
  987.         <wideMargins> <false /> </wideMargins>
  988.         <multipleLines> <false /> </multipleLines>
  989.         <reservedFamily> 0 </reservedFamily>
  990.         <titleWidth>0</titleWidth>
  991.         <icon>0</icon>
  992.         <textAlign>center</textAlign>
  993.         <font>Palatino</font>
  994.         <textSize>18</textSize>
  995.         <textStyle>plain</textStyle>
  996.         <textHeight>24</textHeight>
  997.         <name></name>
  998.         <script>on mousedownvisual zoom opengo cd "settimedate"end mousedown</script>
  999.     </part>
  1000.     <part>
  1001.         <id>7</id>
  1002.         <type>field</type>
  1003.         <visible> <true /> </visible>
  1004.         <dontWrap> <false /> </dontWrap>
  1005.         <dontSearch> <false /> </dontSearch>
  1006.         <sharedText> <false /> </sharedText>
  1007.         <fixedLineHeight> <false /> </fixedLineHeight>
  1008.         <autoTab> <false /> </autoTab>
  1009.         <lockText> <true /> </lockText>
  1010.         <rect>
  1011.             <left>144</left>
  1012.             <top>259</top>
  1013.             <right>268</right>
  1014.             <bottom>335</bottom>
  1015.         </rect>
  1016.         <style>rectangle</style>
  1017.         <autoSelect> <false /> </autoSelect>
  1018.         <showLines> <false /> </showLines>
  1019.         <wideMargins> <false /> </wideMargins>
  1020.         <multipleLines> <false /> </multipleLines>
  1021.         <reservedFamily> 0 </reservedFamily>
  1022.         <titleWidth>0</titleWidth>
  1023.         <icon>0</icon>
  1024.         <textAlign>center</textAlign>
  1025.         <font>Palatino</font>
  1026.         <textSize>18</textSize>
  1027.         <textStyle>plain</textStyle>
  1028.         <textHeight>24</textHeight>
  1029.         <name></name>
  1030.         <script>on mousedownvisual zoom opengo cd "setlocale"end mousedown</script>
  1031.     </part>
  1032.     <part>
  1033.         <id>8</id>
  1034.         <type>field</type>
  1035.         <visible> <true /> </visible>
  1036.         <dontWrap> <false /> </dontWrap>
  1037.         <dontSearch> <false /> </dontSearch>
  1038.         <sharedText> <false /> </sharedText>
  1039.         <fixedLineHeight> <false /> </fixedLineHeight>
  1040.         <autoTab> <false /> </autoTab>
  1041.         <lockText> <true /> </lockText>
  1042.         <rect>
  1043.             <left>8</left>
  1044.             <top>259</top>
  1045.             <right>132</right>
  1046.             <bottom>335</bottom>
  1047.         </rect>
  1048.         <style>rectangle</style>
  1049.         <autoSelect> <false /> </autoSelect>
  1050.         <showLines> <false /> </showLines>
  1051.         <wideMargins> <false /> </wideMargins>
  1052.         <multipleLines> <false /> </multipleLines>
  1053.         <reservedFamily> 0 </reservedFamily>
  1054.         <titleWidth>0</titleWidth>
  1055.         <icon>0</icon>
  1056.         <textAlign>center</textAlign>
  1057.         <font>Palatino</font>
  1058.         <textSize>18</textSize>
  1059.         <textStyle>plain</textStyle>
  1060.         <textHeight>24</textHeight>
  1061.         <name></name>
  1062.         <script>on mousedownvisual zoom opengo cd "getlocale"end mousedown</script>
  1063.     </part>
  1064.     <part>
  1065.         <id>13</id>
  1066.         <type>button</type>
  1067.         <visible> <true /> </visible>
  1068.         <reserved5> 0 </reserved5>
  1069.         <reserved4> 0 </reserved4>
  1070.         <reserved3> 0 </reserved3>
  1071.         <reserved2> 0 </reserved2>
  1072.         <reserved1> 0 </reserved1>
  1073.         <enabled> <true /> </enabled>
  1074.         <rect>
  1075.             <left>452</left>
  1076.             <top>315</top>
  1077.             <right>475</right>
  1078.             <bottom>337</bottom>
  1079.         </rect>
  1080.         <style>transparent</style>
  1081.         <showName> <false /> </showName>
  1082.         <highlight> <false /> </highlight>
  1083.         <autoHighlight> <true /> </autoHighlight>
  1084.         <sharedHighlight> <true /> </sharedHighlight>
  1085.         <family>0</family>
  1086.         <titleWidth>0</titleWidth>
  1087.         <icon>1014</icon>
  1088.         <textAlign>center</textAlign>
  1089.         <font>Chicago</font>
  1090.         <textSize>12</textSize>
  1091.         <textStyle>plain</textStyle>
  1092.         <name></name>
  1093.         <script>on mouseUpvisual wipe rightgo prev cdend mouseUp</script>
  1094.     </part>
  1095.     <part>
  1096.         <id>14</id>
  1097.         <type>button</type>
  1098.         <visible> <true /> </visible>
  1099.         <reserved5> 0 </reserved5>
  1100.         <reserved4> 0 </reserved4>
  1101.         <reserved3> 0 </reserved3>
  1102.         <reserved2> 0 </reserved2>
  1103.         <reserved1> 0 </reserved1>
  1104.         <enabled> <true /> </enabled>
  1105.         <rect>
  1106.             <left>483</left>
  1107.             <top>315</top>
  1108.             <right>506</right>
  1109.             <bottom>337</bottom>
  1110.         </rect>
  1111.         <style>transparent</style>
  1112.         <showName> <false /> </showName>
  1113.         <highlight> <false /> </highlight>
  1114.         <autoHighlight> <true /> </autoHighlight>
  1115.         <sharedHighlight> <true /> </sharedHighlight>
  1116.         <family>0</family>
  1117.         <titleWidth>0</titleWidth>
  1118.         <icon>1013</icon>
  1119.         <textAlign>center</textAlign>
  1120.         <font>Chicago</font>
  1121.         <textSize>12</textSize>
  1122.         <textStyle>plain</textStyle>
  1123.         <name></name>
  1124.         <script>on mouseUpvisual wipe leftgo next cdend mouseUp</script>
  1125.     </part>
  1126.     <content>
  1127.         <layer>card</layer>
  1128.         <id>1</id>
  1129.         <text><span class="style2">ocale Package 1.0</span><span class="style1"></span><span class="style4">by Len Saaf┬⌐1991 Raleigh AssociatesThese XCMDs are free for non-commercial purposes.</span><span class="style3">There are three Hypercard XCMDs in this stack. Two read and write the latititude, longitude and time zone information that is stored in the Macintosh's parameter RAM. The third XCMD will set the time and date of the Macintosh should you ever require that done from Hypercard. The Pascal source code is included. The XCMDs return desciption and usage information when called with "!" and "?" respectively.Feedback is welcome. My address is saaf@joker.optics.rochester.edu</span></text>
  1130.     </content>
  1131.     <content>
  1132.         <layer>card</layer>
  1133.         <id>6</id>
  1134.         <text>SetTimeDateXCMD</text>
  1135.     </content>
  1136.     <content>
  1137.         <layer>card</layer>
  1138.         <id>7</id>
  1139.         <text>SetLocaleXCMD</text>
  1140.     </content>
  1141.     <content>
  1142.         <layer>card</layer>
  1143.         <id>8</id>
  1144.         <text>GetLocaleXCMD</text>
  1145.     </content>
  1146.     <name></name>
  1147.     <script></script>
  1148. </card>
  1149.  
  1150.  
  1151.